home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / powerd / source / lib / chunky_lib.lha / Chunky / GetPixel32.ass < prev    next >
Encoding:
Text File  |  2000-12-05  |  397 b   |  29 lines

  1.  
  2. ; GetPixel32(chunky:a0:PTR TO chunky,x:d0:LONG,y:d1:LONG)(LONG)
  3.  
  4.     machine    mc68020
  5.     fpu    1
  6.  
  7.     xdef    _GetPixel32
  8.  
  9. _GetPixel32
  10.     cmpa.l    #0,a0
  11.     beq.s    .out
  12.     tst.l    d0
  13.     blt.s    .out
  14.     tst.l    d1
  15.     blt.s    .out
  16.     cmp.l    (a0),d0
  17.     bge.s    .out
  18.     cmp.l    (4,a0),d1
  19.     bge.s    .out
  20.  
  21.     muls.l    (a0),d1
  22.     add.l    d0,d1
  23.     lsl.l    #2,d1        ; d1 now contains position in buffer
  24.     movea.l    (8,a0),a1
  25.     move.l    (a1,d1.l),d0
  26.     rts
  27. .out    moveq    #-1,d0
  28.     rts
  29.